package com.electric.electric.mapper.admin;


import com.electric.electric.POJO.DTO.admin.SysUserDTO;
import com.electric.electric.POJO.Entity.admin.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginMapper {
    /**
     * 登录验证
     * @param user
     * @return
     */
    @Select("select * from sys_user where password = #{password} and username = #{username}  ")
    SysUser login(SysUserDTO user);

    /**
     * 查询用户角色信息
     * @param id
     * @return
     */
    @Select("select role_id from sys_user_role where user_id = #{id}")
    Integer getInfo(Integer id);
}
